package com.hyfd.controller.mp;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hyfd.controller.sys.BaseController;
import com.hyfd.service.mp.ProviderGroupBillRelSer;

@Controller
//@Scope("prototype") //开启非单例模式 用于并发控制
public class ProviderGroupBillRelCtl extends BaseController{
	
	@Autowired
	ProviderGroupBillRelSer providerGroupBillRelSer;

    @GetMapping("providerGroupBillRelEditPage/{id}")
	public String providerGroupBillRelEditPage(@PathVariable("id") String id) {
		return providerGroupBillRelSer.providerGroupBillRelEditPage(id);
	}
    
//	@PutMapping("providerGroupBillRel/{id}")
//	@ResponseBody
//	public String providerGroupBillRelPut(@PathVariable("id") String id, HttpServletRequest req) {
//		return providerGroupBillRelSer.providerGroupBillRelEdit(req,id);
//	}
	
	/**
	 * 通道组详情列表数据
	 * */
	@GetMapping("providerGroupbillRelList/{id}")
	@ResponseBody
	public String providerGroupBillRelList(@PathVariable("id")String id, HttpServletRequest req){
		return providerGroupBillRelSer.providerGroupBillRelList(id,req);
	}
	
	/**
	 * 通道组添加和修改通道数据
	 * */
	@PostMapping("providerGroupBillRel")
	@ResponseBody
	public String providerGroupBillRelAdd(HttpServletRequest req){
		return providerGroupBillRelSer.providerGroupBillRelEdit(req);
	}
}
